package feed

import (
	"os"
	"encoding/json"
)

type Feed struct {
	Name		string		`json:"site"`
	Url			string		`json:"link"`
	Type		string		`json:"type"`
}
const data = "firstGo/jsonTrans/data/data.json"
func RetrieveFeeds() ([]*Feed,error){
	file, e := os.Open(data)
	if e != nil {
		return nil,e
	}
	defer file.Close()
	var feeds []*Feed
	e = json.NewDecoder(file).Decode(&feeds)
	return feeds,e
}
